﻿using Kingdee.BOS.Core.DynamicForm.PlugIn;
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.JSON;
using Kingdee.BOS.Util;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RK.DzWebFormBuilderPlugIn.GFT
{
    [Description("GFT:生产入库汇总查询过滤插件"), HotUpdate]
    public class szrkhzcx2 : AbstractDynamicWebFormBuilderPlugIn
    {
        public override void CreateControl(CreateControlEventArgs e)
        {
            base.CreateControl(e);
            if (e.ControlAppearance.Key == "POOrderEntry") //FEntity
            {
                e.Control.Put("showFilterRow", true);

                JSONArray sumfiled = new JSONArray();
                JSONObject sumobj = new JSONObject();
                sumobj["FOrderQty"] = "FOrderQty";
                sumobj["SumType"] = 2;
                sumfiled.Add(sumobj);


                JSONArray columsinfo = new JSONArray();
                JSONObject infoobj = new JSONObject();
                //infoobj["groupSumColums"] = sumfiled;
                infoobj["GroupSumColumns"] = sumfiled;
                columsinfo.Add(infoobj);
                e.Control["GroupColumnInfo"] = columsinfo;
            }
        }
    }
}
